//
//  GlobalDef.h
//  MoneyLog
//
//  Created by Max on 11-3-9.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

///////////////////////////////////////////////////////////////
//全局变量定义
#define isPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define __OUTPUT_CURRENT_METHOD_NAME__	NSLog(@"<%@>", NSStringFromSelector(_cmd));

#ifndef __OPTIMIZE__
#define NSLog(...) NSLog(__VA_ARGS__)
#else
#define NSLog(...) {}
#endif


//表格的行高度
#define ROW_HEIGHT 50

//表格单元格定义
#define LEFT_COLUMN_OFFSET		20
#define LEFT_COLUMN_WIDTH		120

#define MIDDLE_COLUMN_OFFSET	80
#define MIDDLE_COLUMN_WIDTH		80

#define RIGHT_COLUMN_OFFSET		180
#define RIGHT_COLUMN_WIDTH		100

#define UPPER_ROW_TOP			8
#define LOWER_ROW_TOP			34

#define MAIN_FONT_SIZE			18
#define MIN_MAIN_FONT_SIZE		16
#define SECONDARY_FONT_SIZE		12
#define MIN_SECONDARY_FONT_SIZE 10

//convert string color to RGB
#define UIColorFromRGB(rgbValue) [UIColor \
    colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
    green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
    blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

//Date struct
typedef struct
{
    int year;
    int month;
    int day;
}Date;

